#pragma once
#include "Frame.hxx"

class ChannelView;
class SettingView;
class TrackerModel;
class ChannelFourBoxView;


class TrackerView
{
public:
	TrackerView(void);
	~TrackerView(void);

	void initialize();

	//void initializeSubViews();

	void render();

	void reshape( int width, int height );

	inline void setChannelView( int index, ChannelView* view ) { _channelViews[ index ] = view; }
	inline ChannelView* getChannelView( int index ) { return _channelViews[ index ]; }

	inline ChannelFourBoxView* getChannelFourBoxView(){return _channelFourView;};
	inline void setChannelFourBoxView(ChannelFourBoxView* boxView){_channelFourView = boxView;};

	inline void setModel( TrackerModel* model ) { _model = model; }
	void setSubViewModels();

	inline TrackerModel* getModel() { return _model; }

	inline SettingView* getSettingView() { return _settingView; }

	inline void showSettingView() { _isSettingViewVisible = true; }
	inline void hideSettingView() { _isSettingViewVisible = false; }
	inline bool isSettingViewVisible() { return _isSettingViewVisible; }

	void changeSettingViewChannel( int chnIndex );

private:
	int _rectWidth;
	int _rectHeight;

	ChannelView* _channelViews[ CHANNEL_COUNT ];

	ChannelFourBoxView *_channelFourView;

	SettingView* _settingView;

	TrackerModel* _model;

	bool _isSettingViewVisible;
};